﻿using System.Windows;
using System.Windows.Controls;

namespace Module.BindingInjector.Views
{
    /// <summary>
    /// Interaction logic for PUC_InjectorAuthorize
    /// </summary>
    public partial class PUC_InjectorAuthorize : UserControl
    {
        public PUC_InjectorAuthorize()
        {
            InitializeComponent();
            double x = SystemParameters.WorkArea.Width;//得到屏幕工作区域宽度
            double y = SystemParameters.WorkArea.Height;//得到屏幕工作区域高度

            this.Width = x;
            this.Height = y;
            textbox0.Focus();
        }

        private void textbox0_TextChanged(object sender, TextChangedEventArgs e)
        {
            if (this.textbox0.Text.Length >= 4)
            {
                this.textbox1.Focus();
            }
        }

        private void textbox1_TextChanged(object sender, TextChangedEventArgs e)
        {
            if (this.textbox1.Text.Length >= 4)
            {
                this.textbox2.Focus();
            }
        }

        private void textbox2_TextChanged(object sender, TextChangedEventArgs e)
        {
            if (this.textbox2.Text.Length >= 4)
            {
                this.textbox3.Focus();
            }
        }

        private void textbox3_TextChanged(object sender, TextChangedEventArgs e)
        {
            if (this.textbox3.Text.Length >= 4)
            {
                this.textbox4.Focus();
            }
        }

        private void textbox4_TextChanged(object sender, TextChangedEventArgs e)
        {
            if (this.textbox4.Text.Length >= 4)
            {
                this.textbox5.Focus();
            }
        }

        private void textbox5_TextChanged(object sender, TextChangedEventArgs e)
        {
            if (this.textbox5.Text.Length >= 4)
            {
                this.textbox6.Focus();
            }
        }

        private void textbox6_TextChanged(object sender, TextChangedEventArgs e)
        {
            if (this.textbox6.Text.Length >= 4)
            {
                this.textbox7.Focus();
            }
        }

        private void textbox7_TextChanged(object sender, TextChangedEventArgs e)
        {
            if (this.textbox7.Text.Length >= 4)
            {
                this.textbox0.Focus();
            }
        }
    }
}